using System.Collections.Generic;
using UnityEngine;

public class AllKillEvents : MonoBehaviour
{
	public static AllKillEvents instance;

	[Header("Escape From Police")]
	public GameplayEvent EscapeFromPolice;

	[Header("Killd Me")]
	public GameplayEvent killdMe;

	public GameplayEvent killdMyself;

	[Header("Simple Kill")]
	public GameplayEvent simpleKill;

	[Header("Invisible Kill")]
	public InvisibleOrJetpackKillEvent ISeeYou;

	[Header("Headshot")]
	public HeadshotKillEvent Headshot;

	public HeadshotKillEvent Bullseye;

	public HeadshotKillEvent Marksman;

	[Header("Timed Headshot")]
	public TimedKillEvent DoubleHeadshot;

	[Header("Timed LongRange Kill (Online only)")]
	public TimedSimpleKillEvent DoubleKill;

	public TimedSimpleKillEvent TripleKill;

	public TimedSimpleKillEvent MultiKill;

	public TimedSimpleKillEvent Unstoppable;

	public TimedSimpleKillEvent Dominating;

	public TimedSimpleKillEvent Extermination;

	public TimedSimpleKillEvent NoMercy;

	public TimedSimpleKillEvent Godlike;

	[Header("Timed Mob Kill (Offline only)")]
	public KillEvent Civilian1;

	public TimedMobKillEvent Civilian5;

	public TimedMobKillEvent Civilian15;

	public TimedMobKillEvent Civilian30;

	public KillEvent Zombie1;

	public TimedMobKillEvent Zombie10;

	public TimedMobKillEvent Zombie30;

	public TimedMobKillEvent Zombie60;

	public KillEvent Aggressive1;

	public TimedMobKillEvent Aggressive3;

	public TimedMobKillEvent Aggressive10;

	public TimedMobKillEvent Aggressive20;

	public KillEvent Police1;

	public TimedMobKillEvent Police3;

	public TimedMobKillEvent Police10;

	public TimedMobKillEvent Police20;

	[Header("Timed ShortRange Kill")]
	public TimedKillEvent BeatDown;

	public TimedKillEvent Mincer;

	public TimedKillEvent Machete;

	[Header("Car Kill")]
	public KillEvent CarKill;

	public TimedKillEvent CarSPLIT;

	public TimedKillEvent CarSTRIKE;

	[Header("Tank Kill")]
	public KillEvent TankKill;

	public TimedKillEvent TankSPLIT;

	public TimedKillEvent TankSTRIKE;

	[Header("Boat Kill")]
	public KillEvent BoatKill;

	public TimedKillEvent BoatSPLIT;

	public TimedKillEvent BoatSTRIKE;

	[Header("Bike Kill")]
	public KillEvent BikeKill;

	public TimedKillEvent BikeSPLIT;

	public TimedKillEvent BikeSTRIKE;

	[Header("VehicleGun Kill")]
	public KillEvent VehicleGun;

	public TimedKillEvent RAGE;

	public TimedKillEvent SPLATTER;

	[Header("Revenge")]
	public KillLastKillerEvent Revenge;

	[Header("Hit The Bird")]
	public InvisibleOrJetpackKillEvent HitTheBird;

	[Header("Death From Above")]
	public InvisibleOrJetpackKillEvent DeathFromAbove;

	[Header("Boom Kill")]
	public TimedKillEvent BoomKill;

	[Header("BOOOOOM KILL")]
	public TimedKillEvent BOOOOOMKILL;

	[Header("Spaun Kill")]
	public SpaunKillEvent spaunKill;

	private void Awake()
	{
		instance = this;
	}

	public void CheckAllEvents(KillInfo newKill, List<KillInfo> killsList)
	{
		List<string> list = new List<string>();
		if (spaunKill.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(spaunKill);
			list.Add(spaunKill.name);
		}
		if (ISeeYou.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(ISeeYou);
		}
		if (HitTheBird.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(HitTheBird);
			list.Add(HitTheBird.name);
		}
		if (DeathFromAbove.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(DeathFromAbove);
			list.Add(DeathFromAbove.name);
		}
		if (DoubleHeadshot.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(DoubleHeadshot);
			StartCoroutine(DoubleHeadshot.DisableForTime());
			list.Add(DoubleHeadshot.name);
		}
		else if (Headshot.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Headshot);
			list.Add(Headshot.name);
		}
		if (Marksman.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Marksman);
		}
		else if (Bullseye.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Bullseye);
		}
		if (BOOOOOMKILL.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(BOOOOOMKILL);
			StartCoroutine(BOOOOOMKILL.DisableForTime());
			list.Add(BOOOOOMKILL.name);
		}
		if (BoomKill.IfEvent(newKill, killsList) && !BOOOOOMKILL.achieved)
		{
			GameplayRewardManager.instance.AddToRewardQueue(BoomKill);
			StartCoroutine(BoomKill.DisableForTime());
			list.Add(BoomKill.name);
		}
		if (Revenge.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Revenge);
			list.Add(Revenge.name);
		}
		if (Godlike.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Godlike);
			StartCoroutine(Godlike.DisableForTime());
			list.Add(Godlike.name);
		}
		if (NoMercy.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(NoMercy);
			StartCoroutine(NoMercy.DisableForTime());
			list.Add(NoMercy.name);
		}
		if (Extermination.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Extermination);
			StartCoroutine(Extermination.DisableForTime());
			list.Add(Extermination.name);
		}
		if (Dominating.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Dominating);
			StartCoroutine(Dominating.DisableForTime());
			list.Add(Dominating.name);
		}
		if (Unstoppable.IfEvent(newKill, killsList) && !BOOOOOMKILL.achieved)
		{
			GameplayRewardManager.instance.AddToRewardQueue(Unstoppable);
			StartCoroutine(Unstoppable.DisableForTime());
			list.Add(Unstoppable.name);
		}
		if (MultiKill.IfEvent(newKill, killsList) && !BOOOOOMKILL.achieved)
		{
			GameplayRewardManager.instance.AddToRewardQueue(MultiKill);
			StartCoroutine(MultiKill.DisableForTime());
			list.Add(MultiKill.name);
		}
		if (TripleKill.IfEvent(newKill, killsList) && !BOOOOOMKILL.achieved)
		{
			GameplayRewardManager.instance.AddToRewardQueue(TripleKill);
			StartCoroutine(TripleKill.DisableForTime());
			list.Add(TripleKill.name);
		}
		if (DoubleKill.IfEvent(newKill, killsList) && !DoubleHeadshot.achieved && !TripleKill.achieved && !BoomKill.achieved && !BOOOOOMKILL.achieved)
		{
			GameplayRewardManager.instance.AddToRewardQueue(DoubleKill);
			StartCoroutine(DoubleKill.DisableForTime());
			list.Add(DoubleKill.name);
		}
		if (Civilian1.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Civilian1);
			list.Add(Civilian1.name);
		}
		if (Civilian5.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Civilian5);
			StartCoroutine(Civilian5.DisableForTime());
			list.Add(Civilian5.name);
		}
		if (Civilian15.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Civilian15);
			StartCoroutine(Civilian15.DisableForTime());
			list.Add(Civilian15.name);
		}
		if (Civilian30.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Civilian30);
			StartCoroutine(Civilian30.DisableForTime());
			list.Add(Civilian30.name);
		}
		if (Zombie1.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Zombie1);
			list.Add(Zombie1.name);
		}
		if (Zombie10.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Zombie10);
			StartCoroutine(Zombie10.DisableForTime());
			list.Add(Zombie10.name);
		}
		if (Zombie30.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Zombie30);
			StartCoroutine(Zombie30.DisableForTime());
			list.Add(Zombie30.name);
		}
		if (Zombie60.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Zombie60);
			StartCoroutine(Zombie60.DisableForTime());
			list.Add(Zombie60.name);
		}
		if (Aggressive1.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Aggressive1);
			list.Add(Aggressive1.name);
		}
		if (Aggressive3.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Aggressive3);
			StartCoroutine(Aggressive3.DisableForTime());
			list.Add(Aggressive3.name);
		}
		if (Aggressive10.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Aggressive10);
			StartCoroutine(Aggressive10.DisableForTime());
			list.Add(Aggressive10.name);
		}
		if (Aggressive20.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Aggressive20);
			StartCoroutine(Aggressive20.DisableForTime());
			list.Add(Aggressive20.name);
		}
		if (Police1.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Police1);
			list.Add(Police1.name);
		}
		if (Police3.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Police3);
			StartCoroutine(Police3.DisableForTime());
			list.Add(Police3.name);
		}
		if (Police10.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Police10);
			StartCoroutine(Police10.DisableForTime());
			list.Add(Police10.name);
		}
		if (Police20.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Police20);
			StartCoroutine(Police20.DisableForTime());
			list.Add(Police20.name);
		}
		if (BeatDown.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(BeatDown);
			StartCoroutine(BeatDown.DisableForTime());
			list.Add(BeatDown.name);
		}
		if (Mincer.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Mincer);
			StartCoroutine(Mincer.DisableForTime());
			list.Add(Mincer.name);
		}
		if (Machete.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(Machete);
			StartCoroutine(Machete.DisableForTime());
			list.Add(Machete.name);
		}
		if (CarKill.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(CarKill);
			list.Add(CarKill.name);
		}
		if (CarSPLIT.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(CarSPLIT);
			StartCoroutine(CarSPLIT.DisableForTime());
			list.Add(CarSPLIT.name);
		}
		if (CarSTRIKE.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(CarSTRIKE);
			StartCoroutine(CarSTRIKE.DisableForTime());
			list.Add(CarSPLIT.name);
		}
		if (TankKill.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(TankKill);
			list.Add(TankKill.name);
		}
		if (TankSPLIT.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(TankSPLIT);
			StartCoroutine(TankSPLIT.DisableForTime());
			list.Add(TankSPLIT.name);
		}
		if (TankSTRIKE.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(TankSTRIKE);
			StartCoroutine(TankSTRIKE.DisableForTime());
			list.Add(TankSTRIKE.name);
		}
		if (BoatKill.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(BoatKill);
			list.Add(BoatKill.name);
		}
		if (BoatSPLIT.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(BoatSPLIT);
			StartCoroutine(BoatSPLIT.DisableForTime());
			list.Add(BoatSPLIT.name);
		}
		if (BoatSTRIKE.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(BoatSTRIKE);
			StartCoroutine(BoatSTRIKE.DisableForTime());
			list.Add(BoatSTRIKE.name);
		}
		if (BikeKill.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(BikeKill);
			list.Add(BikeKill.name);
		}
		if (BikeSPLIT.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(BikeSPLIT);
			StartCoroutine(BikeSPLIT.DisableForTime());
			list.Add(BikeSPLIT.name);
		}
		if (BikeSTRIKE.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(BikeSTRIKE);
			StartCoroutine(BikeSTRIKE.DisableForTime());
			list.Add(BikeSTRIKE.name);
		}
		if (VehicleGun.IfEvent(newKill))
		{
			GameplayRewardManager.instance.AddToRewardQueue(VehicleGun);
			list.Add(VehicleGun.name);
		}
		if (RAGE.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(RAGE);
			StartCoroutine(RAGE.DisableForTime());
			list.Add(RAGE.name);
		}
		if (SPLATTER.IfEvent(newKill, killsList))
		{
			GameplayRewardManager.instance.AddToRewardQueue(SPLATTER);
			StartCoroutine(SPLATTER.DisableForTime());
			list.Add(SPLATTER.name);
		}
		if (!spaunKill.IfEvent(newKill) && simpleKill.IfEvent())
		{
			GameplayRewardManager.instance.AddToRewardQueue(simpleKill);
			if (GameplayRewardManager.instance.EventList.Count == 0)
			{
				if (newKill.onlineKill)
				{
					GameplayRewardManager.instance.ShowOverheadTextMessage(base.gameObject.transform, "+" + simpleKill.pvpXP);
				}
				else
				{
					GameplayRewardManager.instance.ShowOverheadTextMessage(base.gameObject.transform, "+" + simpleKill.offlineXP);
				}
			}
		}
		GameplayRewardManager.instance.TryShowMessage();
	}
}
